<template>
	<view class="mainBg h100">
		<view class="countdown">
			{{countdown}}
		</view>
		<view class="content">
			<image src="@/static/loading.png" mode=""></image>
			<view class="text">
				真 空 心 一 念
			</view>
			<view class="text">
				妙 有 芯 世 界
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				countdown: 3,
				timer: null
			}
		},
		onLoad() {
			this.timer = setInterval(() => {
				if (this.countdown > 0) {
					this.countdown--
				}
				if (this.countdown == 0) {
					clearInterval(this.timer);
					uni.switchTab({
						url: "/pages/index/index"
					})
				}
			}, 1000)
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	page {
		background-color: #35CBAD;
	}

	.content {
		text-align: center;
		position: fixed;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		width: 100%;

		image {
			width: 300rpx;
			height: 280rpx;
			margin-bottom: 200rpx;
		}

		.text {
			font-family: "宋体";
			font-weight: bold;
			font-size: 56rpx;
			text-shadow: 0px 2px 6px rgba(0, 0, 0, 0.4);
			line-height: 78rpx;
		}
	}

	.countdown {
		color: #fff;
		background-color: #FFBF6B;
		border-radius: 100px;
		width: 100rpx;
		line-height: 70rpx;
		font-weight: bold;
		font-size: 40rpx;
		text-align: center;
		position: fixed;
		right: 40rpx;
		top: 70rpx;
	}
</style>